#!/bin/bash

disk_usage=$(zmachine disk usage)
is_health=$(zmachine disk healthcheck)

log::info "Disk Usage: ${disk_usage}%"

if [ "$is_health" = "true" ]; then
  log::success "Disk Healthy: True"
else
  log::error "Disk Healthy: False"
  log::error "WARN: please check your disk first"
  exit 1
fi
